#include "CModelStatic.h"

bool CModelStatic::analyzeFile(std::vector<std::string> vctLines)
{
	for (size_t i = 0; i < vctLines.size(); i++)
	{
		std::string sVal = vctLines[i];
		size_t found = sVal.find('/');
		if (found == std::string::npos)
		{
			found = sVal.find('*');
			if (found != std::string::npos)
			{
				m_mapKeyLines[sVal.c_str()].push_back(sVal.c_str());
			}
		}
		else
		{
			std::string str = sVal.substr(0, found);
			std::string sKey = removeSpaces(str);
			m_mapKeyLines[sKey.c_str()].push_back(sVal.c_str());
		}			
	}
	return true;
}

std::map<std::string, std::vector<std::string>> CModelStatic::getStatisticsMessage()
{
	return m_mapKeyLines;
}